<?php
class Stream_Node extends Record {

    public function setTableDefinition() {
        $this->setTableName("stream_nodes");

        $this->hasIdColumn();
        $this->hasReferenceColumn("stream_id", TRUE);

        $this->hasColumn("title", "string", array(
            "length" => LENGTH_DESCRIPTION
        ) );

        $this->hasColumn("content", "string", array(
            "length" => LENGTH_INFO
        ) );

        $this->hasColumn("language", "string", array(
            "length" => LENGTH_LANGUAGE_CODE
        ) );

        $this->hasColumn("pub_date", "integer", array(
            "length" => 32
        ) );

        $this->hasColumn("hash", "integer", array(
            "length" => LENGTH_MD5
        ) );

        $this->hasColumn("link", "string", array(
            "length" => LENGTH_URL
        ) );

        $this->hasColumn("comments", "integer");
    }

}